<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="zh">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.5"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>SWM34S_LVGL7.11_SWMUI: C:/Users/DELL/Desktop/Commit/lvgl/SWM34S_LVGL7.11_SWMUI_20230515/APP/BSP/dev_dac.h 源文件</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr id="projectrow">
  <td id="projectalign">
   <div id="projectname">SWM34S_LVGL7.11_SWMUI<span id="projectnumber">&#160;V7.9</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.9.5 -->
<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_0ca16891106f5a3e9ad635a0d6c5f98f.html">APP</a></li><li class="navelem"><a class="el" href="dir_4ca18d753a70f6eada20fde478bd3fc8.html">BSP</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle"><div class="title">dev_dac.h</div></div>
</div><!--header-->
<div class="contents">
<a href="dev__dac_8h.html">浏览该文件的文档.</a><div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno">    1</span> </div>
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno">   22</span><span class="preprocessor">#ifndef __DEV_DAC_H__</span></div>
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno">   23</span><span class="preprocessor">#define __DEV_DAC_H__</span></div>
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno">   24</span> </div>
<div class="line"><a id="l00025" name="l00025"></a><span class="lineno">   25</span><span class="preprocessor">#include &quot;SWM341.h&quot;</span></div>
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno">   26</span> </div>
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno">   27</span><span class="comment">/* DAC_DMA 使用的通道号 */</span></div>
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno"><a class="line" href="dev__dac_8h.html#a5cf167f3b1930852accd27d796f47195">   28</a></span><span class="preprocessor">#define DAC_DMA_CHN             DMA_CH0</span></div>
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno">   29</span> </div>
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno">   31</span><span class="keyword">extern</span> <span class="keyword">const</span> uint16_t <a class="code hl_variable" href="dev__dac_8h.html#aae6320f87b86b6a56b02cf050eb8a0b8">Sin_Data</a>[100];</div>
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno">   32</span> </div>
<div class="line"><a id="l00038" name="l00038"></a><span class="lineno">   38</span>uint8_t <a class="code hl_function" href="dev__dac_8h.html#ab18d2dbe4e762641f948bc31b52234f4">dac_dma_transfer_done</a>(<span class="keywordtype">void</span>);</div>
<div class="line"><a id="l00039" name="l00039"></a><span class="lineno">   39</span> </div>
<div class="line"><a id="l00043" name="l00043"></a><span class="lineno">   43</span><span class="keywordtype">void</span> <a class="code hl_function" href="dev__dac_8h.html#aab3eb615ca98a910e727b600de131c18">dac_port_init</a>(<span class="keywordtype">void</span>);</div>
<div class="line"><a id="l00044" name="l00044"></a><span class="lineno">   44</span> </div>
<div class="line"><a id="l00048" name="l00048"></a><span class="lineno">   48</span><span class="keywordtype">void</span> <a class="code hl_function" href="dev__dac_8h.html#ae6564f4952cc109138c86b644e9585d9">dac_port_deinit</a>(<span class="keywordtype">void</span>);</div>
<div class="line"><a id="l00049" name="l00049"></a><span class="lineno">   49</span> </div>
<div class="line"><a id="l00053" name="l00053"></a><span class="lineno">   53</span><span class="keywordtype">void</span> <a class="code hl_function" href="dev__dac_8h.html#a6e622fafee8436bf9cf9f6b120352e3c">dac_init</a>(<span class="keywordtype">void</span>);</div>
<div class="line"><a id="l00054" name="l00054"></a><span class="lineno">   54</span> </div>
<div class="line"><a id="l00064" name="l00064"></a><span class="lineno">   64</span><span class="keywordtype">void</span> <a class="code hl_function" href="dev__dac_8h.html#a1cbb394145c7d8b7a7d17fc24a2d6406">dac_dma_init</a>(uint16_t *addr, uint32_t count, uint32_t frequency);</div>
<div class="line"><a id="l00065" name="l00065"></a><span class="lineno">   65</span> </div>
<div class="line"><a id="l00069" name="l00069"></a><span class="lineno">   69</span><span class="keywordtype">void</span> <a class="code hl_function" href="dev__dac_8h.html#a7274a6adbc1a4a9f5a2f27be8d1225e4">dac_dma_deinit</a>(<span class="keywordtype">void</span>);</div>
<div class="line"><a id="l00070" name="l00070"></a><span class="lineno">   70</span> </div>
<div class="line"><a id="l00071" name="l00071"></a><span class="lineno">   71</span><span class="preprocessor">#endif </span><span class="comment">//__DEV_DAC_H__</span></div>
<div class="ttc" id="adev__dac_8h_html_a1cbb394145c7d8b7a7d17fc24a2d6406"><div class="ttname"><a href="dev__dac_8h.html#a1cbb394145c7d8b7a7d17fc24a2d6406">dac_dma_init</a></div><div class="ttdeci">void dac_dma_init(uint16_t *addr, uint32_t count, uint32_t frequency)</div><div class="ttdoc">DAC_DMA 配置, 采用 TIMR 触发 DMA 步进传输</div><div class="ttdef"><b>Definition:</b> <a href="dev__dac_8c_source.html#l00169">dev_dac.c:169</a></div></div>
<div class="ttc" id="adev__dac_8h_html_a6e622fafee8436bf9cf9f6b120352e3c"><div class="ttname"><a href="dev__dac_8h.html#a6e622fafee8436bf9cf9f6b120352e3c">dac_init</a></div><div class="ttdeci">void dac_init(void)</div><div class="ttdoc">初始化 DAC 模块</div><div class="ttdef"><b>Definition:</b> <a href="dev__dac_8c_source.html#l00148">dev_dac.c:148</a></div></div>
<div class="ttc" id="adev__dac_8h_html_a7274a6adbc1a4a9f5a2f27be8d1225e4"><div class="ttname"><a href="dev__dac_8h.html#a7274a6adbc1a4a9f5a2f27be8d1225e4">dac_dma_deinit</a></div><div class="ttdeci">void dac_dma_deinit(void)</div><div class="ttdoc">DAC_DMA 配置恢复初始默认状态</div><div class="ttdef"><b>Definition:</b> <a href="dev__dac_8c_source.html#l00198">dev_dac.c:198</a></div></div>
<div class="ttc" id="adev__dac_8h_html_aab3eb615ca98a910e727b600de131c18"><div class="ttname"><a href="dev__dac_8h.html#aab3eb615ca98a910e727b600de131c18">dac_port_init</a></div><div class="ttdeci">void dac_port_init(void)</div><div class="ttdoc">配置 DAC 驱动端口以及功放静音控制脚, 开启声音</div><div class="ttdef"><b>Definition:</b> <a href="dev__dac_8c_source.html#l00119">dev_dac.c:119</a></div></div>
<div class="ttc" id="adev__dac_8h_html_aae6320f87b86b6a56b02cf050eb8a0b8"><div class="ttname"><a href="dev__dac_8h.html#aae6320f87b86b6a56b02cf050eb8a0b8">Sin_Data</a></div><div class="ttdeci">const uint16_t Sin_Data[100]</div><div class="ttdoc">正弦波音频 - DAC 测试</div><div class="ttdef"><b>Definition:</b> <a href="dev__dac_8c_source.html#l00059">dev_dac.c:59</a></div></div>
<div class="ttc" id="adev__dac_8h_html_ab18d2dbe4e762641f948bc31b52234f4"><div class="ttname"><a href="dev__dac_8h.html#ab18d2dbe4e762641f948bc31b52234f4">dac_dma_transfer_done</a></div><div class="ttdeci">uint8_t dac_dma_transfer_done(void)</div><div class="ttdoc">DAC DMA 判断是否传输完成</div><div class="ttdef"><b>Definition:</b> <a href="dev__dac_8c_source.html#l00106">dev_dac.c:106</a></div></div>
<div class="ttc" id="adev__dac_8h_html_ae6564f4952cc109138c86b644e9585d9"><div class="ttname"><a href="dev__dac_8h.html#ae6564f4952cc109138c86b644e9585d9">dac_port_deinit</a></div><div class="ttdeci">void dac_port_deinit(void)</div><div class="ttdoc">恢复 DAC 驱动端口以及功放静音控制脚的默认状态, 使能静音</div><div class="ttdef"><b>Definition:</b> <a href="dev__dac_8c_source.html#l00133">dev_dac.c:133</a></div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
制作者&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.5
</small></address>
</body>
</html>
